import request from '@/utils/request2'

// 查询行政区划列表
export function listArea(query) {
  return request({
    url: '/stuManage/area/list',
    method: 'get',
    params: query
  })
}

export function listTree() {
  return request({
    url: '/stuManage/area/list/tree'
  })
}

export function label(ids) {
  return request({
    url: '/stuManage/area/label/'+ids,
    method: 'get'
  })
}

// 查询行政区划详细
export function getArea(areaId) {
  return request({
    url: '/stuManage/area/' + areaId,
    method: 'get'
  })
}

// 新增行政区划
export function addArea(data) {
  return request({
    url: '/stuManage/area',
    method: 'post',
    data: data
  })
}

// 修改行政区划
export function updateArea(data) {
  return request({
    url: '/stuManage/area',
    method: 'put',
    data: data
  })
}

// 删除行政区划
export function delArea(areaId) {
  return request({
    url: '/stuManage/area/' + areaId,
    method: 'delete'
  })
}
